home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Poly2.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
-
- const int FMax = 16;
- TColor Farbe[FMax] =
- {clBlack, clMaroon, clGreen, clNavy, clTeal, clPurple,
- clOlive, clGray, clSilver, clRed, clLime, clBlue,
- clAqua, clFuchsia, clYellow, clWhite};
-
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- randomize ();
- Color = Farbe[random (FMax)];
- Obutton1 = new TOOButton (this, Farbe[random(FMax/2)+8]);
- Obutton1->Parent = this;
- Obutton1->SetSize (Rect(120,60,ClientWidth-120,ClientHeight-60));
- }
- //---------------------------------------------------------------------------
-
-